<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">

<TITLE>Upload your story: History of Adoption in Australia</TITLE>
<META name="robots" content="noindex,nofollow">
<LINK href="static/form-style.css" rel="stylesheet" type="text/css"
	media="screen">

</HEAD>
<BODY>



<DIV id="header">
<H1>History of Adoption in Australia</H1>
<DIV id="logos"><IMG src="static/logo-monash.jpg"
	alt="Monash University logo" name="logo_monash" width="208" height="34"
	id="logo_monash"><BR>
<IMG src="static/acu-logo.jpg" width="248" height="35"
	alt="Australian Catholic University logo" id="logo_acu"></DIV>
<DIV class="clear_both"></DIV>
</DIV>
<DIV id="content">
<FORM enctype="multipart/form-data" action="submit" method="post">

<%
	// This is a scriptlet.  Notice that the "date"
	// variable we declare here is available in the
	// embedded expression later on.
	response.setContentType("text/html;charset=UTF-8");

	if (true) {

		try {
			com.oreilly.servlet.multipart.MultipartParser mp = new com.oreilly.servlet.multipart.MultipartParser(
					request, 1 * 1024 * 1024); // 10MB
			com.oreilly.servlet.multipart.Part part;
			while ((part = mp.readNextPart()) != null) {
				String name = part.getName();
				if (part.isParam()) {
					// it's a parameter part
					com.oreilly.servlet.multipart.ParamPart paramPart = (com.oreilly.servlet.multipart.ParamPart) part;
					String value = paramPart.getStringValue();
					if (name.equals("story")) {
						if (value.equals("yes-researcher")) {
%>
<h2>Confirmation</h2>
<p>Please just click the Submit button to submit your data</p>
<P><INPUT type="submit" value="Submit"></P>

<%
	} else {
%>
<H2>Upload your story</H2>
<P>The file may take considerable time to upload, depending upon the
speed of your internet connection and the file size of your story.</P>
<P>The maximum file size which can be uploaded is <STRONG>150
megabytes</STRONG>.</P>
<P>If you require any help with uploading or creating your story,
please view the <A
	href="http://vera057.its.monash.edu.au/history-of-adoption/help.html"
	target="_blank">Help page</A>.</P>
<INPUT type="hidden" name="new_filename" value="2010061-232-test" />
<P class="question">Attach file: <INPUT name="file_1" type="file"
	onchange="checkExt(this.value)" /></P>

<P><INPUT type="submit" value="Upload File" /></P>
<%
	}

					}
					//out.println("param; name=" + name + ", value=" + value);
					out.println("<input type='hidden' name='" + name
							+ "' value='" + value + "' />");

				} else {
					// the field did not contain a file
					out.println("file; name=" + name + "; EMPTY");
				}
				out.flush();
			}
		} catch (java.io.IOException lEx) {
			out.println("Dude error");
			out.println(lEx.getMessage());
		}
	}
	//out.println( String.valueOf( date ));
%>
</FORM>
<BR>
<BR>
</DIV>


</BODY>
</HTML>